using System;
using System.Collections.Generic;
using System.Text;
using FluentNHibernate.Mapping;
using Water.Model;

namespace Water.Data.Repositories.Mappings
{


    public class PipeNetDamageLedgerMap : ClassMap<PipeNetDamageLedger>
    {

        public PipeNetDamageLedgerMap()
        {
            Table("Tbt_PipeNetDamageLedger");
            Id(x => x.MRNO).GeneratedBy.Assigned().Column("MRNO");
            Map(x => x.EpcNo).Column("EpcNO").Not.Nullable();
            References<Pipeline>(x => x.Pl, "EpcNO").PropertyRef(e => e.EpcNO).ReadOnly();
            Map(x => x.DamageReason).Column("DamageReason").Not.Nullable();
            Map(x => x.FaultSource).Column("FaultSource");
            Map(x => x.FaultDt).Column("FaultDt");
            Map(x => x.StartDt).Column("StartDt");
            Map(x => x.FinishDt).Column("FinishDt");
            Map(x => x.FinishDept).Column("FinishDept");
            Map(x => x.OpertionEmp).Column("OpertionEmp").Not.Nullable();
            Map(x => x.CreateDt).Column("CreateDt").ReadOnly();
        }
    }
}
